home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / general / modelers / geomview / source.lha / Geomview / include / mgribP.h < prev    next >
C/C++ Source or Header  |  1993-08-03  |  2KB  |  61 lines

  1. #include <stdio.h>
  2. #include "mg.h"
  3. #include "mgP.h"
  4. #include "mgrib.h"
  5. #include "transform.h"
  6. #include "bezierP.h"
  7.  
  8. typedef struct mgribcontext {
  9.   struct mgcontext mgctx;    /* The mgcontext */
  10.   int born;            /* Has window been displayed on the screen? */
  11.   int win;            /* window ID, or 0 */
  12.  
  13.   int render_device;    /* Device Options */
  14. #define RMD_ASCII    0x1
  15. #define RMD_BINARY    0x2
  16.  
  17.  
  18. /* Which line drawing technique?
  19.  * MG_RIBPOLYGON for creating RIB tokens true to OOGL/geomview, but may appear
  20.  *    incorrect when viewed dynamically
  21.  * MG_RIBCYLINDER for creating RIB tokens which may be dynamically viewed, but
  22.  *    may not be true to OOGL/geomview
  23.  * MG_RIBPRMANLINE for NeXT Renderer - May Cause Incompatibilities!
  24.  * Note: Future versions of renderman should support line drawing, NeXT does
  25.  * now.
  26.  */
  27.   int line_mode;
  28.  
  29.   FILE *rib;
  30.   char filepath[256];
  31. #define DEFAULT_RIB_FILE "geom.rib"
  32.  
  33.   int display;        /* MG_RIBFRAME: render to framebuffer (screen window)
  34.                MG_RIBFILE: render to file  */
  35.   char displayname[256];/* if display == MG_RIFILE, name of the file */
  36.                
  37.   int backing;        /* MG_RIBDOBG: simulate colored background w/ polygon
  38.                  MG_RIBNOBG: no background simulation (defualt) */
  39.   int shader;        /* MG_RIBSTDSHADE: uses standard shader
  40.                  MG_RIBEXTSHADE: uses extended shaders (eplastic,
  41.                    heplastic, hplastic) */
  42.   char *shadepath;    /* path to extended shaders or user shaders */
  43.   char ribscene[128];    /* scene name for RIB 1.0 file comments */
  44.   char ribcreator[128]; /* creator field for RIB 1.0 file comments */
  45.               /* defaults to "mgrib driver" */
  46.   char ribfor[128];    /* for(user) field for RIB 1.0 file comments */
  47.               /* defaults to user account name */
  48.   char ribdate[128];    /* creation date, defualts to today's date */
  49. } mgribcontext;
  50.  
  51. /* Make some convenient defines */
  52. #define RiDEV  _mgribc->render_device
  53. #define NotImplemented(name) fprintf(stderr,"%s is not yet implemented.\n",name);
  54.  
  55. #define _mgribc        ((mgribcontext*)_mgc)
  56. #define RI_INFINITY 1.0e38
  57.  
  58. void mgrib_printmatrix(Transform T);
  59. void mgrib_drawline(HPoint3 *p1, HPoint3 *p2);
  60. void mgrib_drawpoint(HPoint3 *p);
  61.